﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PurchaseSales.Manage.Model.Entities
{
    /// <summary>
    /// 登录用户
    /// </summary>
    public class User : Entity<Guid>
    {
        public virtual string Password { get; set; }
    }

    /// <summary>
    /// 产品
    /// </summary>
    public class Commodity : Entity<Guid>
    {
        public virtual string ProdctType { get; set; }
        public virtual string Manufacturer { get; set; }
        public virtual double Inventory { get; set; }
        public virtual double UnitPrice { get; set; }
        public virtual string Unit { get; set; }
    }

    /// <summary>
    /// 顾客
    /// </summary>
    public class Customer : Entity<Guid>
    {
        public virtual string Phone { get; set; }
        public virtual string Remark { get; set; }
    }

    /// <summary>
    /// 购买产品
    /// </summary>
    public class PurchaseCommodity : Entity<Guid>
    {
        public virtual int Count { get; set; }
        public virtual double PurchasePrice { get; set; }
        public virtual double Totalprice { get; set; }
    }

    /// <summary>
    /// 销售订单
    /// </summary>
    public class SaleOrders : Entity<Guid>
    {
        public virtual Customer Customer { get; set; }
        public virtual string Address { get; set; }
        public virtual string Contract { get; set; }//订单
        public virtual string Status { get; set; }//订单状态
        public virtual DateTime OrderDate { get; set; }//订单日期
    }

    /// <summary>
    /// 销售产品
    /// </summary>
    public class SaleCommodity
    {
        public virtual Guid Id { get; set; }
        public virtual SaleOrders SaleOrders { get; set; }
        public virtual Commodity Commodity { get; set; }
        public virtual double Count { get; set; }
        public virtual double SalesPrice { get; set; }
        public virtual double TotalPrice { get; set; }
    }

    /// <summary>
    /// 供应商 订单
    /// </summary>
    public class PurchaseOrders : Entity<Guid>
    {
        public virtual SaleOrders SaleOrders { get; set; }
    }
}
